package com.kuqi.fragments;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.kuqi.R;
import com.kuqi.entitiy.Book;

// 书籍详情页面的书籍简介tab
public class BookInfoDetailFragment extends Fragment {

    // 当前的显示页面内容
    View currentView;

    // 对应的书籍实体
    private Book bookInfo;

    // 控制单位
    private TextView tv_book_content_describe;

    // 构造
    public BookInfoDetailFragment(Book book){
        this.bookInfo = book;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        currentView = inflater.inflate(R.layout.fragment_bookinfo_detail, container, false);
        tv_book_content_describe = currentView.findViewById(R.id.tv_book_content_describe);
        tv_book_content_describe.setText(bookInfo.getDescribe());
        tv_book_content_describe.append("\r\n \r\n \r\n");  // 给末尾三个空行,方便滑动
        return currentView;
    }

}
